﻿using System;
using System.Collections;
using Huirui.Cavan.Domain.MainBoundedContext.StockModule;
using Huirui.Cavan.Domain.Seedwork;

namespace Huirui.Cavan.Domain.MainBoundedContext.SalesModule
{
    #region SalesOrderDetail

    /// <summary>
    /// SalesOrderDetail object for NHibernate mapped table 'SalesOrderDetail'.
    /// </summary>
    [Serializable]
    public class SalesOrderDetail : Persistent<long>
    {
        #region Member Variables

        protected decimal _number;
        protected decimal _unitCost;
        protected decimal _discountRate;
        protected decimal _discountAmount;
        protected decimal _salesAmount;
        protected decimal _wholeAmount;
        protected decimal _taxRate;
        protected decimal _taxAmount;
        protected decimal _unStockOutNumber;
        protected decimal _unStockOutAmount;
        protected string _description;
        protected SalesOrder _salesOrder;
        protected Stock _stock;
        protected WareHouse _wareHouse;

        #endregion

        #region Constructors

        public SalesOrderDetail() { }

        public SalesOrderDetail(decimal number, decimal unitCost, decimal discountRate, decimal discountAmount, decimal salesAmount, decimal wholeAmount, decimal taxRate, decimal taxAmount, string description, DateTime createDate, DateTime modifyDate, int editUser, SalesOrder salesOrder, Stock stock, WareHouse wareHouse)
        {
            this._number = number;
            this._unitCost = unitCost;
            this._discountRate = discountRate;
            this._discountAmount = discountAmount;
            this._salesAmount = salesAmount;
            this._wholeAmount = wholeAmount;
            this._taxRate = taxRate;
            this._taxAmount = taxAmount;
            this._description = description;
            this._createDate = createDate;
            this._modifyDate = modifyDate;
            this._editUser = editUser;
            this._salesOrder = salesOrder;
            this._stock = stock;
            this._wareHouse = wareHouse;
            this._unStockOutNumber = this._number;
            this._unStockOutAmount = this._wholeAmount;
        }

        #endregion

        #region Public Properties


        public virtual decimal Number
        {
            get { return _number; }
            set { _number = value; }
        }

        public virtual decimal UnitCost
        {
            get { return _unitCost; }
            set { _unitCost = value; }
        }

        public virtual decimal DiscountRate
        {
            get { return _discountRate; }
            set { _discountRate = value; }
        }

        public virtual decimal DiscountAmount
        {
            get { return _discountAmount; }
            set { _discountAmount = value; }
        }

        public virtual decimal SalesAmount
        {
            get { return _salesAmount; }
            set { _salesAmount = value; }
        }

        public virtual decimal WholeAmount
        {
            get { return _wholeAmount; }
            set { _wholeAmount = value; }
        }

        public virtual decimal TaxRate
        {
            get { return _taxRate; }
            set { _taxRate = value; }
        }

        public virtual decimal TaxAmount
        {
            get { return _taxAmount; }
            set { _taxAmount = value; }
        }

        public virtual decimal UnStockOutNumber
        {
            get { return _unStockOutNumber; }
            set { _unStockOutNumber = value; }
        }

        public virtual decimal UnStockOutAmount
        {
            get { return _unStockOutAmount; }
            set { _unStockOutAmount = value; }
        }

        public virtual string Description
        {
            get { return _description; }
            set
            {
                _description = value;
            }
        }

        public virtual SalesOrder SalesOrder
        {
            get { return _salesOrder; }
            set { _salesOrder = value; }
        }

        public virtual Stock Stock
        {
            get { return _stock; }
            set { _stock = value; }
        }

        public virtual WareHouse WareHouse
        {
            get { return _wareHouse; }
            set { _wareHouse = value; }
        }



        #endregion
    }
    #endregion
}